﻿<%@ Page Title="" Language="C#"  AutoEventWireup="true" CodeBehind="RegistroUP.aspx.cs" Inherits="AppGisena.Presentacion.Up.RegistroUP" %>

    <%@ Import Namespace="System.Collections.Generic"%>

<%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>





         <!DOCTYPE html>

<html>

<body>
 
        <form id="form1" runat="server">
    <ext:ResourceManager runat="server" />
    
    
  
    
    <ext:FormPanel 
        ID="FormPanPrinc" 
        runat="server"
        Title="REGISTRO DE UNIDADES PRODUCTIVAS"
        Width="600" 
        Height="800"        
        BodyPadding="10"
        DefaultAnchor="100%"
         Layout="AutoLayout"
         StyleSpec="position:absolute;top: 10%;left: 30%;width: 77px; height: 78px;margin-top: -39px; margin-left: -39px;"
        UI="Success">

      <%--Form Panel Principal  --%>
                

        <Items>
            
            <ext:FieldContainer 
                runat="server" 
                MsgTarget="Side"
                CombineErrors="true"
                FieldLabel="Codigo Up"
                Layout="HBoxLayout">
                  <Items>
                        <ext:NumberField   ID="Txt_Cod_Up" runat="server" MaxLeng="20"  AllowBlank="false" Width="150" />
                          <ext:Toolbar     runat="server"       Flex="1"     Flat="true">   
                        <Items>
                            <ext:Button ID="Button7" runat="server" Text="Buscar..." Icon="Zoom" >
                                   <DirectEvents>
                                   <Click OnEvent="Btn_BuscarUPGISENA_Click">
                                   <EventMask ShowMask="true" Msg="Buscando..." MinDelay="500" />
                                  </Click>
                           </DirectEvents>
                         </ext:Button>
                            
                        </Items>
                    </ext:Toolbar>
                  </Items>

                  </ext:FieldContainer>

        </Items>



        <Items>

         <%--Contenedor datos basicos de la up sofia  --%>

            <ext:FieldSet 
                runat="server"
                Title="Detalle de la Up"
                DefaultAnchor="100%">
                <Defaults>
                    <ext:Parameter Name="labelWidth" Value="89" Mode="Raw" />
                </Defaults>
                <Items>
               
                      

                     <ext:FieldContainer 
                runat="server" 
                FieldLabel="Nombre Up" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:TextField ID ="Txt_Nomb_UP2" runat="server" Width="250" Margins="0 3 0 0" ReadOnly="true"/>                    
                </Items>
            </ext:FieldContainer>

                 


                    <%-- Numero de actas sofia plus al registro ya seleccionado --%>

                <ext:FieldContainer 
                runat="server" 
                FieldLabel="Cod. Centro" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                      
                      <ext:TextField ID="Txt_Cod_Cent_Form2" runat="server" Width="250" Margins="0 3 0 0" ReadOnly="true"/>                  
                </Items>
            </ext:FieldContainer>


             <%-- Numero de la ficha --%>

                <ext:FieldContainer 
                runat="server" 
                FieldLabel="No. Ficha" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:TextField   ID="Txt_NFicha_UP2" runat="server" Width="250" Margins="0 3 0 0" ReadOnly="true"/>                    
                </Items>
            </ext:FieldContainer>

                </Items>




            </ext:FieldSet>
        </Items>

        


        <Items>


         <%--Contenedor tab panel pricipal --%>
          
<ext:TabPanel runat="server" ID="TabPrinc" Width="300" Height="420"  AutoScroll="true">
        <Items>

                           <%--Panel datos sofia--%>
                <ext:Panel
                    ID="PanelDatosofia"
                runat="server" 
                Title="Datos Sofia" 
                Disabled="true"
                BodyPadding="6" AutoScroll="true">
                <TabConfig runat ="server"  UI="Warning"/>
                <Content>

                   <ext:FieldSet 
                runat="server"
                Title="Detalle de la Up"
                Collapsible="true"
                DefaultAnchor="100%">
                <Defaults>
                    <ext:Parameter Name="labelWidth" Value="89" Mode="Raw" />
                </Defaults>


                    
        <Items>
            
            <ext:FieldContainer 
                runat="server" 
                MsgTarget="Side"
                CombineErrors="true"
                FieldLabel="CodigoUP Sofia"
                Layout="HBoxLayout">
                  <Items>
                        <ext:NumberField   ID="txt_codUPSofia" runat="server" MaxLeng="20"  AllowBlank="false" Width="100" />
                          <ext:Toolbar     runat="server"       Flex="1"     Flat="true">   
                        <Items>
                            <ext:Button ID="Button1" runat="server" Text="Buscar..." Icon="Zoom" >
                                   <DirectEvents>
                                   <Click OnEvent="Btn_BuscarUP_Sofia">
                                   <EventMask ShowMask="true" Msg="Buscando..." MinDelay="500" />
                                  </Click>
                           </DirectEvents>
                         </ext:Button>
                            
                        </Items>
                    </ext:Toolbar>
                  </Items>

                  </ext:FieldContainer>

        </Items>





                <Items>
               

                    <%-- Codigo de la Regional sofia up--%>
                     <ext:FieldContainer 
                runat="server" 
                FieldLabel="Cod. Regional" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:NumberField   ID="Txt_Cod_Reg" runat="server" MaxLeng="20"  AllowBlank="false" Width="250" ReadOnly="true" />                    
                </Items>
            </ext:FieldContainer>

                    <%-- Nombre de la regiona Sofia up--%>
                      <ext:FieldContainer 
                runat="server" 
                FieldLabel="Nombre Regional" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:TextField ID ="Txt_Nombre_Reg" runat="server" Width="250" Margins="0 3 0 0" ReadOnly="true" />                    
                </Items>
            </ext:FieldContainer>



                   
                <%-- Codigo del centro de Formacion sofia up--%>
         <ext:FieldContainer 
                runat="server" 
                FieldLabel="Cod. Centro de Formacion" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:NumberField   ID="Txt_Cod_Cent_Form" runat="server" MaxLeng="20"  AllowBlank="false" Width="250" ReadOnly="false" />                    
                </Items>
            </ext:FieldContainer>


                    <%-- Nombre del Centro de Formacion sofia up--%>
                    <ext:FieldContainer 
                runat="server" 
                FieldLabel="Nomb. Centro de Formacion" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:TextField ID ="Txt_Nombre_Cen_For" runat="server" Width="250" Margins="0 3 0 0" ReadOnly="true"/>                    
                </Items>
            </ext:FieldContainer>

                    <%-- Id_Ficha Sofia up--%>
                    <ext:FieldContainer 
                runat="server" 
                FieldLabel="No. Ficha" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:NumberField   ID="Txt_NFicha_UP" runat="server" MaxLeng="20"  AllowBlank="false" Width="250" ReadOnly="true" />                    
                </Items>
            </ext:FieldContainer>

                    <%-- Codigo sofia Up--%>
                     <ext:FieldContainer 
                runat="server" 
                FieldLabel="Codigo UP" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:NumberField   ID="Cod_UP" runat="server" MaxLeng="20"  AllowBlank="false" Width="250" ReadOnly="true" />                    
                </Items>
            </ext:FieldContainer>

                    <%-- nombre Up sofia--%>
                     <ext:FieldContainer 
                runat="server" 
                FieldLabel="Nombre Up" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:TextField ID ="Nomb_UP" runat="server" Width="250" Margins="0 3 0 0" ReadOnly="true" />                    
                </Items>
            </ext:FieldContainer>
                    
                 <%-- fecha de creacion--%>


                       <ext:FieldContainer 
                runat="server" 
                FieldLabel="Fecha de Creación" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:TextField ID ="DfechaCreacion" runat="server" Width="250" Margins="0 3 0 0" ReadOnly="true" />                    
                </Items>
            </ext:FieldContainer>

                 

                    <%-- Fecha entrega materiales--%>

                <ext:FieldContainer 
                runat="server" 
                FieldLabel="Fecha Entrega Materiales" 
                AnchorHorizontal="100%" 
                Layout="HBoxLayout">                                       
                <Items>
                    <ext:TextField ID ="DFechaEntregaMat" runat="server" Width="250" Margins="0 3 0 0" ReadOnly="true" />                    
                </Items>
                </ext:FieldContainer>


                    
             <ext:Toolbar     runat="server"       Flex="1"     Flat="true">   
               <Items>
                              <ext:Button runat="server" Text="Registrar Up" ID="Btn_Reg_Up" icon="Add">
                                 <DirectEvents>
                                   <Click OnEvent="Btn_Registrar_Up">
                                   <EventMask ShowMask="true" Msg="Registrando Up" MinDelay="500" />
                                  </Click>
                            </DirectEvents>
                       </ext:Button>
                        </Items>

                    </ext:Toolbar>   

                </Items>
            </ext:FieldSet>

                    </Content>
                </ext:Panel>







             <%--panel de caracterizacion UP --%>
             <ext:Panel
                 ID="PanelCarat"
                runat="server" 
                Title="Caracterizacion UP" 
                  Disabled="true"
                BodyPadding="6" AutoScroll="true"
                >
                 <TabConfig runat ="server"  UI="Warning"/>
                     <Listeners>
                            <Activate Handler="#{DirectMethods}.CargarListas();" />
                 </Listeners>
                 
                <Content>

                <ext:FieldSet 
                runat="server"
                Title="Registrar Caracterizacion de la Unidad Productiva"
                Collapsible="true"
                DefaultAnchor="100%">   
                    
                    
                          
                   <Items>
             <%--Select Box del tipo de la Unidad Productiva Caracterizacion Up --%>
                    <ext:FieldContainer 
                                     runat="server" 
                                     MsgTarget="Side"
                                     CombineErrors="true"
                                     FieldLabel="Tipo UP"
                                     Layout="HBoxLayout">
                <Items>
                   <ext:SelectBox
                                ID="Slb_Tp_up"
                                runat="server" 
            
                                ValueField="Id_Tp_UP"
                                DisplayField="Nombre"

                                EmptyText="Seleccione el Tipo de UP." 
                                >
                            <Store>
                                 <ext:Store runat="server" ID="StTipoUP">
                                <Model>
                                        <ext:Model runat="server">
                                        <Fields>
                                        <ext:ModelField Name="Id_Tp_UP" Type="Int" />
                                        <ext:ModelField Name="Nombre" Type="String"/>
                                    </Fields>
                                </ext:Model>
                    </Model>            
                </ext:Store>    
            </Store>    
        </ext:SelectBox>
                    
             </Items>      
                   </ext:FieldContainer>
                       </Items> 
                    
                      <%--  Text Area de la Descripcion de la Unidad Productiva Caracterizacion --%>
                  <Items>
                    <ext:FieldContainer 
                                     runat="server" 
                                     MsgTarget="Side"
                                     CombineErrors="true"
                                     FieldLabel="Descripción"
                                     Layout="HBoxLayout">
                                                         <Items>                       
                                                              <ext:TextArea runat="server"   EmptyText="Digite una Descripción" ID="TxtA_Descripcion_UP" /> 
                                                          </Items>
                   </ext:FieldContainer>
                   </Items>
                    <%--  Numero de Acta de la Unidad Productiva Caracterizacion --%>
                                  <Items> 
                                     <ext:FieldContainer 
                                     runat="server" 
                                     MsgTarget="Side"
                                     CombineErrors="true"
                                     FieldLabel="Numero Acta"
                                     Layout="HBoxLayout">

                                    <Items>                                            
                                            <ext:TextField ID ="Txt_Num_Act_Mat" runat="server" Width="100" Margins="0 3 0 0" Weight="25"   EmptyText="Digite el Numero de acta de entrega de materiales"  />    
                                     </Items>
                                    </ext:FieldContainer>
                   </Items>
                    <%--  Estado de la Unidad Productiva Caracterizacion --%>
                <Items>
                    <ext:FieldContainer 
                                     runat="server" 
                                     MsgTarget="Side"
                                     CombineErrors="true"
                                     FieldLabel="Estado UP"
                                     Layout="HBoxLayout">

                                    <Items>
                   <ext:SelectBox
                                 ID="Sel_Id_Est_up"
                                 runat="server" 
                                 ValueField="Id_Est"
                                 DisplayField="Nombre"
                                 EmptyText="Seleccione el Estado de la UP." 
                                
                                  >
                      
                                     <Store>
                                          <ext:Store runat="server" ID="StEstado">
                                          <Model>
                                            <ext:Model runat="server" IDProperty="Id_Est">
                                           <Fields>
                                             <ext:ModelField Name="Id_Est" />
                                             <ext:ModelField Name="Nombre" />
                                
                                         </Fields>
                          </ext:Model>
                    </Model>            
                </ext:Store>    
            </Store>    
        </ext:SelectBox>
             </Items>      

                      </ext:FieldContainer>
                 </Items> 


                  
         <%--Boton Guardar Caracterizacion --%>
            <Items>  
             <ext:Toolbar     runat="server"       Flex="1"     Flat="true">   
                       
                        <Items>
                            <ext:Button ID="Btn_Guardar_Caract" runat="server" Text="Guardar" Icon="Add" >
                                   <DirectEvents>
                                   <Click OnEvent="Btn_Registrar_caract">
                                  </Click>
                           </DirectEvents>
                         </ext:Button>
                            
                        </Items>
                        </ext:Toolbar>
            </Items>  
        


   
 </ext:FieldSet>
                
                </Content>
              
            </ext:Panel>
       
             </Items>
    

    </ext:TabPanel>
            </Items>
  
</ext:FormPanel>

    </form>
</body>
</html>

